FROM frolvlad/alpine-oraclejre8:slim
VOLUME /tmp
ADD base.jar app.jar
ENV  TIME_ZONE Asia/Shanghai
RUN sh -c 'touch /app.jar'
#同步容器时区
RUN apk add --no-cache tzdata && echo "${TIME_ZONE}" > /etc/timezone && ln -sf /usr/share/zoneinfo/${TIME_ZONE} /etc/localtime
ENV JAVA_OPTS=""
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]